package dao.sqlmap;

import java.sql.SQLException;

import model.Address;

import com.ibatis.dao.client.DaoManager;
import com.ibatis.dao.client.template.SqlMapDaoTemplate;

import dao.DeleteDAO;
import dao.NewDAO;

public class DeleteSQLMapDao extends SqlMapDaoTemplate implements DeleteDAO{
	
	private static final String DELETE_ADDRESS = "deleteAddress";
	private static final String SELECTBYID_ADDRESS = "selectByID";

	public DeleteSQLMapDao(DaoManager dm) {
		super(dm);
	}
	

	public void deleteAddress(int id) throws SQLException{
	      delete(DELETE_ADDRESS, Integer.valueOf(id));
	      
	     
	}


	@Override
	public Address selectByID(int id) throws SQLException {
		return (Address)queryForObject(SELECTBYID_ADDRESS,id);
	}


	
	
}



	